public class EventLogsManagerView
extends javax.swing.JFrame
JFrame
,
Serialized Formjavax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private javax.swing.JDesktopPane |
contentArea
The
JDesktopPane that defines the main
central area of the application. |
private javax.swing.JPanel |
discoveryTab
The
JPanel that defines the second tab of
the menu and contains all the buttons of the Discovery tab. |
private javax.swing.JFileChooser |
fileChooser
This is the object that manage the user's files selection
in many situation, such as opening a file or saving a content
in a destination file.
|
private javax.swing.JPanel |
fileTab
The
JPanel that defines the first tab of
the menu and contains all the buttons of the File tab. |
private javax.swing.JPanel |
footerArea
The
JPanel that defines the bar at the
bottom of the JFrame frame. |
private javax.swing.ButtonGroup |
footerAreaButtonsGroup
|
private javax.swing.JPanel |
helpAndAboutTab
The
JPanel that defines the third tab of the
menu and contains all the buttons of the Help and About tab. |
private javax.swing.JTabbedPane |
menuArea
The
JTabbedPane that contains all the
tabs of the menu and their components. |
private static long |
serialVersionUID
Auto-Generated Serial Version UID for this class.
|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
EventLogsManagerView()
Constructs a new
EventLogManagerView , initialising its
instance variables and calling the method initGUI() . |
Modifier and Type | Method and Description |
---|---|
void |
addMainFrameKeyEventDispatcher(java.awt.KeyEventDispatcher dispatcher)
Adds a
KeyEventDispatcher to the KeyboardFocusManager of this frame. |
void |
addMainFrameWindowListener(java.awt.event.WindowListener listener)
Adds a
WindowListener listener to this JFrame frame. |
javax.swing.JDesktopPane |
getContentArea()
This method returns the
JDesktopPane contentArea GUI component. |
javax.swing.JPanel |
getDiscoveryTab()
This method returns the
JPanel discoveryTab GUI component. |
javax.swing.JFileChooser |
getFileChooser()
This method returns the
JFileChooser fileChooser component. |
javax.swing.JPanel |
getFileTab()
This method returns the
JPanel fileTab GUI component. |
javax.swing.JPanel |
getFooterArea()
This method returns the
JPanel footerArea GUI component. |
javax.swing.ButtonGroup |
getFooterAreaButtonsGroup()
This method returns the
ButtonGroup footerAreaButtonsGroup
GUI utility component. |
javax.swing.JPanel |
getHelpAndAboutTab()
This method returns the
JPanel helpAndAboutTab GUI component. |
javax.swing.JTabbedPane |
getMenuArea()
This method returns the
JTabbedPane menuArea GUI component. |
private void |
initGUI()
Initialises the GUI by setting all its components.
|
EventLogEditor |
newEventLogEditor(java.lang.String title,
int internalFrameID)
|
FooterAreaButton |
newFooterAreaButton(java.lang.String text,
int internalFrameID)
Adds a new
FooterAreaButton button inside the footerArea
with the specified settings, included the identifier of the JInternalFrame
to manage. |
javax.swing.JInternalFrame |
newInternalFrame(java.lang.String title,
int internalFrameID)
Adds a new
JInternalFrame object inside the contentArea . |
void |
showErrorMessage(java.lang.String errorMessage)
This method displays the passed error message string in a dialog on the application frame.
|
java.lang.String |
showFileSelectionDialog(java.lang.String dialogTitle,
java.lang.String selectedFile,
javax.swing.filechooser.FileFilter... filesFilter)
This method shows a dialog for selecting a file.
|
void |
showInfoMessage(java.lang.String infoMessage)
This method displays the passed info message string in a dialog on the application frame.
|
int |
showOptionDialog(java.lang.Object message,
java.lang.String title,
int messageType,
java.lang.Object[] options,
java.lang.Object initialValue)
Opens a dialog that displays the passed message and then makes the user
decides between an array of options.
|
void |
showWarningMessage(java.lang.String warningMessage)
This method displays the passed warning message string in a dialog on the application frame.
|
void |
start()
Starts the GUI by setting its main
JFrame frame visible. |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final long serialVersionUID
private javax.swing.JTabbedPane menuArea
JTabbedPane
that contains all the
tabs of the menu and their components.JTabbedPane
private javax.swing.JPanel fileTab
JPanel
that defines the first tab of
the menu and contains all the buttons of the File tab.JPanel
private javax.swing.JPanel discoveryTab
JPanel
that defines the second tab of
the menu and contains all the buttons of the Discovery tab.JPanel
private javax.swing.JPanel helpAndAboutTab
JPanel
that defines the third tab of the
menu and contains all the buttons of the Help and About tab.JPanel
private javax.swing.JDesktopPane contentArea
JDesktopPane
that defines the main
central area of the application. Inside this area the
application opens all the JInternalFrame
frames.JDesktopPane
,
JInternalFrame
private javax.swing.JPanel footerArea
JPanel
that defines the bar at the
bottom of the JFrame
frame. This bar contains all the
FooterAreaButton
buttons associated to the opened JInternalFrame
frames.JPanel
,
JFrame
,
JInternalFrame
private javax.swing.ButtonGroup footerAreaButtonsGroup
ButtonGroup
private javax.swing.JFileChooser fileChooser
This object remembers user's directory choice and shows the last directory visited at the next file selection.
JFileChooser
public EventLogsManagerView()
EventLogManagerView
, initialising its
instance variables and calling the method initGUI()
.public javax.swing.JTabbedPane getMenuArea()
JTabbedPane
menuArea
GUI component.menuArea
GUI component.public javax.swing.JPanel getFileTab()
JPanel
fileTab
GUI component.fileTab
GUI component.public javax.swing.JPanel getDiscoveryTab()
JPanel
discoveryTab
GUI component.discoveryTab
GUI component.public javax.swing.JPanel getHelpAndAboutTab()
JPanel
helpAndAboutTab
GUI component.helpAndAboutTab
GUI component.public javax.swing.JDesktopPane getContentArea()
JDesktopPane
contentArea
GUI component.contentArea
GUI component.public javax.swing.JPanel getFooterArea()
JPanel
footerArea
GUI component.footerArea
GUI component.public javax.swing.ButtonGroup getFooterAreaButtonsGroup()
ButtonGroup
footerAreaButtonsGroup
GUI utility component.footerAreaButtonsGroup
GUI utility component.public javax.swing.JFileChooser getFileChooser()
JFileChooser
fileChooser
component.JFileChooser
component.public void start()
JFrame
frame visible.JFrame
private void initGUI()
public EventLogEditor newEventLogEditor(java.lang.String title, int internalFrameID)
EventLogEditor
object, extension of the
JInternalFrame
class, inside the contentArea
.
This method also sets the internal frame dimension and position on the
contentArea
, calculating both in relationship of the available space
in the area.
One of the passed parameter is the internal frame identifier to set, this is
needed to create a connection between this frame and its associated FooterAreaButton
.
title
- the title of the internal frameinternalFrameID
- the identifier of the EventLogEditor
EventLogEditor
object created.EventLogEditor
,
FooterAreaButton
,
JInternalFrame
public javax.swing.JInternalFrame newInternalFrame(java.lang.String title, int internalFrameID)
JInternalFrame
object inside the contentArea
.
This method also sets the internal frame dimension and position on the
contentArea
, calculating both in relationship of the available space
in the area.
One of the passed parameter is the internal frame identifier to set, this is
needed to create a connection between this frame and its associated FooterAreaButton
.
title
- the title of the internal frameinternalFrameID
- the identifier of the JInternalFrame
JInternalFrame
object created.JInternalFrame
public FooterAreaButton newFooterAreaButton(java.lang.String text, int internalFrameID)
FooterAreaButton
button inside the footerArea
with the specified settings, included the identifier of the JInternalFrame
to manage.text
- the text of the buttoninternalFrameID
- the identifier of the JInternalFrame
to manageFooterAreaButton
button created.public int showOptionDialog(java.lang.Object message, java.lang.String title, int messageType, java.lang.Object[] options, java.lang.Object initialValue)
message
- the message to displaytitle
- the title for the dialogmessageType
- an integer designating the kind of message this is, primarily used to determine
the icon from the pluggable Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGEoptions
- an array of objects indicating the possible choices the user can make;
if the objects are components, they are rendered properly; non-String objects are rendered using their
toString methods; if this parameter is null
, the options YES/NO/CANCEL are usedinitialValue
- the object that represents the default selection for the dialog; only meaningful
if options is used; can be null
public java.lang.String showFileSelectionDialog(java.lang.String dialogTitle, java.lang.String selectedFile, javax.swing.filechooser.FileFilter... filesFilter)
dialogTitle
- the title of the dialog and the text of the approve buttonselectedFile
- the name of the file to set as selected on the dialog, null
for no selectionfilesFilter
- the filters (zero, one or more, passing zero, one or more FileNameExtensionFilter
objects, or an array containing them, to this method) to use for displaying the list of files in the dialognull
otherwise.public void showInfoMessage(java.lang.String infoMessage)
It defines already the title of the dialog ("Event Logs Manager Info System") and its
type (INFORMATION_MESSAGE
).
infoMessage
- the info message to displaypublic void showWarningMessage(java.lang.String warningMessage)
It defines already the title of the dialog ("Event Logs Manager Warning System") and its
type (WARNING_MESSAGE
).
warningMessage
- the warning message to displaypublic void showErrorMessage(java.lang.String errorMessage)
It defines already the title of the dialog ("Event Logs Manager Error System") and its
type (ERROR_MESSAGE
).
errorMessage
- the error message to displaypublic void addMainFrameWindowListener(java.awt.event.WindowListener listener)
WindowListener
listener to this JFrame
frame.listener
- the WindowListener
listener to add to the frameWindowListener
,
JFrame
public void addMainFrameKeyEventDispatcher(java.awt.KeyEventDispatcher dispatcher)
KeyEventDispatcher
to the KeyboardFocusManager
of this frame.dispatcher
- the KeyEventDispatcher
to add to the KeyboardFocusManager
of the frameKeyEventDispatcher
,
KeyboardFocusManager